/*
 * Allwinner SoCs display driver.
 *
 * This file is licensed under the terms of the GNU General Public
 * License version 2.  This program is licensed "as is" without any
 * warranty of any kind, whether express or implied.
 */

/*******************************************************************************
 *  All Winner Tech, All Right Reserved. 2014-2015 Copyright (c)
 *
 *  File name   :       de_vep_table.c
 *
 *  Description :       display engine 2.0 video enhancement processor
 *                      common fir table coefficients
 *
 *  History     :       2016/03/29  vito cheng  v0.1  Initial version
 *
 ******************************************************************************/
#include "de_vep_table.h"

int r2r[2][16] = {
	/* input : Full RGB  */
	/* output : Full RGB 709 */
	{
		0x00020000, 0x00000000, 0x00000000, 0x00000000,
		0x00000000, 0x00020000, 0x00000000, 0x00000000,
		0x00000000, 0x00000000, 0x00020000, 0x00000000,
		0x00000000, 0x00000000, 0x00000000, 0x00000000,
	},

	/* input : Full RGB  */
	/* output : Limit RGB  */
	{
		0x0002542a, 0x00000000, 0x00000000, 0x00000000,
		0x00000000, 0x0002542a, 0x00000000, 0x00000000,
		0x00000000, 0x00000000, 0x0002542a, 0x00000000,
		0xffffffc0, 0xffffffc0, 0xffffffc0, 0x00000000,
	}
};

int r2y[14][16] = {
	/* input : Full RGB 709 */
	/* output : Limit YCbCr 601 */
	{
		0x0000837a, 0x0001021d, 0x00003221, 0x00000040,
		0xffffb41c, 0xffff6b03, 0x0000e0e1, 0x00000200,
		0x0000e0e1, 0xffff43b1, 0xffffdb6e, 0x00000200,
		0x00000000, 0x00000000, 0x00000000, 0x00000000,
	},

	/* input : Full RGB 709 */
	/* output : Limit YCbCr 709 */
	{
		0x00005d7c, 0x00013a7c, 0x00001fbf, 0x00000040,
		0xffffcc78, 0xffff52a7, 0x0000e0e1, 0x00000200,
		0x0000e0e1, 0xffff33be, 0xffffeb61, 0x00000200,
		0x00000000, 0x00000000, 0x00000000, 0x00000000,
	},

	/* input : Full RGB 709 */
	/* output : Limit YCbCr 2020 */
	{
		0x00007384, 0x00012a21, 0x00001a13, 0x00000040,
		0xffffc133, 0xffff5dec, 0x0000e0e1, 0x00000200,
		0x0000e0e1, 0xffff3135, 0xffffedea, 0x00000200,
		0x00000000, 0x00000000, 0x00000000, 0x00000000,
	},

	/* input : Full RGB 709 */
	/* output : Limit YCbCr FCC */
	{
		0x000083ea, 0x0001036f, 0x0000305e, 0x00000040,
		0xffffb433, 0xffff6aec, 0x0000e0e1, 0x00000200,
		0x0000e0e1, 0xffff4276, 0xffffdca9, 0x00000200,
		0x00000000, 0x00000000, 0x00000000, 0x00000000,
	},

	/* input : Full RGB 709 */
	/* output : Limit YCbCr 240M */
	{
		0x00005d38, 0x0001343e, 0x00002641, 0x00000040,
		0xffffcbc8, 0xffff5357, 0x0000e0e1, 0x00000200,
		0x0000e0e1, 0xffff37f3, 0xffffe72c, 0x00000200,
		0x00000000, 0x00000000, 0x00000000, 0x00000000,
	},

	/* input : Full RGB 709 */
	/* output : Limit YCbCr Ycgco */
	{
		0x00006dee, 0x0000dbdc, 0x00006dee, 0x00000040,
		0xffff8f90, 0x0000e0e1, 0xffff8f90, 0x00000200,
		0x0000e0e1, 0x00000000, 0xffff1f1f, 0x00000200,
		0x00000000, 0x00000000, 0x00000000, 0x00000000,
	},

	/* input : Full RGB 709 */
	/* output : Limit YCbCr GBR */
	{
		0x00000000, 0x0001b7b8, 0x00000000, 0x00000040,
		0x00000000, 0x00000000, 0x0001c1c2, 0x00000200,
		0x0001c1c2, 0x00000000, 0x00000000, 0x00000200,
		0x00000000, 0x00000000, 0x00000000, 0x00000000,
	},

	/* input : Full RGB 709 */
	/* output : Full YCbCr 601 */
	{
		0x00009917, 0x00012c8b, 0x00003a5e, 0x00000000,
		0xffffa99b, 0xffff5665, 0x00010000, 0x00000200,
		0x00010000, 0xffff29a2, 0xffffd65e, 0x00000200,
		0x00000000, 0x00000000, 0x00000000, 0x00000000,
	},

	/* input : Full RGB 709 */
	/* output : Full YCbCr 709 */
	{
		0x00006cda, 0x00016e2f, 0x000024f7, 0x00000000,
		0xffffc557, 0xffff3aa9, 0x00010000, 0x00000200,
		0x00010000, 0xffff1779, 0xffffe887, 0x00000200,
		0x00000000, 0x00000000, 0x00000000, 0x00000000,
	},

	/* input : Full RGB 709 */
	/* output : Full YCbCr 2020 */
	{
		0x00008681, 0x00015b23, 0x00001e5d, 0x00000000,
		0xffffb882, 0xffff477e, 0x00010000, 0x00000200,
		0x00010000, 0xffff1497, 0xffffeb69, 0x00000200,
		0x00000000, 0x00000000, 0x00000000, 0x00000000,
	},

	/* input : Full RGB 709 */
	/* output : Full YCbCr FCC */
	{
		0x0000999a, 0x00012e14, 0x00003852, 0x00000000,
		0xffffa9b5, 0xffff564b, 0x00010000, 0x00000200,
		0x00010000, 0xffff283b, 0xffffd7c5, 0x00000200,
		0x00000000, 0x00000000, 0x00000000, 0x00000000,
	},

	/* input : Full RGB 709 */
	/* output : Full YCbCr 240M */
	{
		0x00006c8b, 0x000166e9, 0x00002c8b, 0x00000000,
		0xffffc48e, 0xffff3b72, 0x00010000, 0x00000200,
		0x00010000, 0xffff1c44, 0xffffe3bc, 0x00000200,
		0x00000000, 0x00000000, 0x00000000, 0x00000000,
	},

	/* input : Full RGB 709 */
	/* output : Full YCbCr Ycgco */
	{
		0x00008000, 0x00010000, 0x00008000, 0x00000000,
		0xffff8000, 0x00010000, 0xffff8000, 0x00000200,
		0x00010000, 0x00000000, 0xffff0000, 0x00000200,
		0x00000000, 0x00000000, 0x00000000, 0x00000000,
	},

	/* input : Full RGB 709 */
	/* output : Full YCbCr GBR */
	{
		0x00000000, 0x00020000, 0x00000000, 0x00000000,
		0x00000000, 0x00000000, 0x00020000, 0x00000200,
		0x00020000, 0x00000000, 0x00000000, 0x00000200,
		0x00000000, 0x00000000, 0x00000000, 0x00000000,
	}
};

int y2yl2l[21][16] = {
	/* input : Limit YCbCr 601 */
	/* output : Limit YCbCr 601 */
	{
		0x00020000, 0x00000000, 0x00000000, 0x00000000,
		0x00000000, 0x00020000, 0x00000000, 0x00000000,
		0x00000000, 0x00000000, 0x00020000, 0x00000000,
		0x00000000, 0x00000000, 0x00000000, 0x00000000,
	},

	/* input : Limit YCbCr 601 */
	/* output : Limit YCbCr 709 */
	{
		0x00020000, 0xffffc4d7, 0xffff9589, 0x00000040,
		0x00000000, 0x0002098b, 0x00003aaf, 0x00000200,
		0x00000000, 0x0000266d, 0x00020cf8, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr 601 */
	/* output : Limit YCbCr 2020 */
	{
		0x00020000, 0xffffbfce, 0xffffc5ff, 0x00000040,
		0x00000000, 0x00020521, 0x00001f89, 0x00000200,
		0x00000000, 0x00002c87, 0x00020f07, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr 709 */
	/* output : Limit YCbCr 601 */
	{
		0x00020000, 0x000032d9, 0x00006226, 0x00000040,
		0x00000000, 0x0001face, 0xffffc759, 0x00000200,
		0x00000000, 0xffffdae7, 0x0001f780, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr 709 */
	/* output : Limit YCbCr 709 */
	{
		0x00020000, 0x00000000, 0x00000000, 0x00000000,
		0x00000000, 0x00020000, 0x00000000, 0x00000000,
		0x00000000, 0x00000000, 0x00020000, 0x00000000,
		0x00000000, 0x00000000, 0x00000000, 0x00000000,
	},

	/* input : Limit YCbCr 709 */
	/* output : Limit YCbCr 2020 */
	{
		0x00020000, 0xfffff782, 0x00003036, 0x00000040,
		0x00000000, 0x0001fd99, 0xffffe5ca, 0x00000200,
		0x00000000, 0x000005e4, 0x0002015a, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr 2020 */
	/* output : Limit YCbCr 601 */
	{
		0x00020000, 0x00003b03, 0x000034d2, 0x00000040,
		0x00000000, 0x0001fd8c, 0xffffe183, 0x00000200,
		0x00000000, 0xffffd4f3, 0x0001f3fa, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr 2020 */
	/* output : Limit YCbCr 709 */
	{
		0x00020000, 0x00000916, 0xffffd061, 0x00000040,
		0x00000000, 0x0002021c, 0x00001a40, 0x00000200,
		0x00000000, 0xfffffa19, 0x0001fe5a, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr 2020 */
	/* output : Limit YCbCr 2020 */
	{
		0x00020000, 0x00000000, 0x00000000, 0x00000000,
		0x00000000, 0x00020000, 0x00000000, 0x00000000,
		0x00000000, 0x00000000, 0x00020000, 0x00000000,
		0x00000000, 0x00000000, 0x00000000, 0x00000000,
	},

	/* input : Limit YCbCr FCC */
	/* output : Limit YCbCr 601 */
	{
		0x00020000, 0x00000410, 0x0000005e, 0x00000040,
		0x00000000, 0x0001fff7, 0xffffffca, 0x00000200,
		0x00000000, 0xfffffd09, 0x0001ff00, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr FCC */
	/* output : Limit YCbCr 709 */
	{
		0x00020000, 0xffffc985, 0xffff9623, 0x00000040,
		0x00000000, 0x0002092b, 0x00003a5a, 0x00000200,
		0x00000000, 0x00002362, 0x00020bed, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr FCC */
	/* output : Limit YCbCr 2020 */
	{
		0x00020000, 0xffffc435, 0xffffc681, 0x00000040,
		0x00000000, 0x000204e9, 0x00001f42, 0x00000200,
		0x00000000, 0x00002979, 0x00020dfb, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr 240M */
	/* output : Limit YCbCr 601 */
	{
		0x00020000, 0x0000259d, 0x00005fd5, 0x00000040,
		0x00000000, 0x0001f9e5, 0xffffc8af, 0x00000200,
		0x00000000, 0xffffe490, 0x0001f9a1, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr 240M */
	/* output : Limit YCbCr 709 */
	{
		0x00020000, 0xfffff0dc, 0xfffffd16, 0x00000040,
		0x00000000, 0x0002002d, 0x0000019b, 0x00000200,
		0x00000000, 0x000009d5, 0x00020248, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr 240M */
	/* output : Limit YCbCr 2020 */
	{
		0x00020000, 0xffffe94a, 0x00002d7c, 0x00000040,
		0x00000000, 0x0001fd45, 0xffffe746, 0x00000200,
		0x00000000, 0x00000fc1, 0x000203a8, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr Ycgco */
	/* output : Limit YCbCr 601 */
	{
		0x00020000, 0x00005719, 0x00005c9b, 0x00000040,
		0x00000000, 0xfffeacc9, 0xfffea99b, 0x00000200,
		0x00000000, 0xfffe5344, 0x000129a2, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr Ycgco */
	/* output : Limit YCbCr 709 */
	{
		0x00020000, 0x0000d772, 0x00004648, 0x00000040,
		0x00000000, 0xfffe7552, 0xfffec557, 0x00000200,
		0x00000000, 0xfffe2ef3, 0x00011779, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr Ycgco */
	/* output : Limit YCbCr 2020 */
	{
		0x00020000, 0x0000b234, 0x000065d1, 0x00000040,
		0x00000000, 0xfffe8efb, 0xfffeb882, 0x00000200,
		0x00000000, 0xfffe292e, 0x00011497, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr GBR */
	/* output : Limit YCbCr 601 */
	{
		0x00012c8b, 0x00003a5e, 0x00009917, 0x00000040,
		0xffff5285, 0x000105d8, 0xffffa99b, 0x00000200,
		0xffff24bd, 0xffffd56b, 0x00010000, 0x00000200,
		0xffffffc0, 0xffffffc0, 0xffffffc0, 0x00000000,
	},

	/* input : Limit YCbCr GBR */
	/* output : Limit YCbCr 709 */
	{
		0x00016e2f, 0x000024f7, 0x00006cda, 0x00000040,
		0xffff3628, 0x000105d8, 0xffffc557, 0x00000200,
		0xffff122a, 0xffffe7fe, 0x00010000, 0x00000200,
		0xffffffc0, 0xffffffc0, 0xffffffc0, 0x00000000,
	},

	/* input : Limit YCbCr GBR */
	/* output : Limit YCbCr 2020 */
	{
		0x00015b23, 0x00001e5d, 0x00008681, 0x00000040,
		0xffff4347, 0x000105d8, 0xffffb882, 0x00000200,
		0xffff0f37, 0xffffeaf1, 0x00010000, 0x00000200,
		0xffffffc0, 0xffffffc0, 0xffffffc0, 0x00000000,
	},
};

int y2yf2l[21][16] = {
	/* input : Full YCbCr 601 */
	/* output : Limit YCbCr 601 */
	{
		0x0001b7b8, 0x00000000, 0x00000000, 0x00000040,
		0x00000000, 0x0001c1c2, 0x00000000, 0x00000200,
		0x00000000, 0x00000000, 0x0001c1c2, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr 601 */
	/* output : Limit YCbCr 709 */
	{
		0x0001b7b8, 0xffffcc08, 0xffffa27b, 0x00000040,
		0x00000000, 0x0001ca24, 0x0000338d, 0x00000200,
		0x00000000, 0x000021c1, 0x0001cd26, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr 601 */
	/* output : Limit YCbCr 2020 */
	{
		0x0001b7b8, 0xffffc79c, 0xffffcd0c, 0x00000040,
		0x00000000, 0x0001c643, 0x00001bb4, 0x00000200,
		0x00000000, 0x0000271d, 0x0001cef5, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr 709 */
	/* output : Limit YCbCr 601 */
	{
		0x0001b7b8, 0x00002cab, 0x00005638, 0x00000040,
		0x00000000, 0x0001bd32, 0xffffce3c, 0x00000200,
		0x00000000, 0xffffdf6a, 0x0001ba4a, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr 709 */
	/* output : Limit YCbCr 709 */
	{
		0x0001b7b8, 0x00000000, 0x00000000, 0x00000040,
		0x00000000, 0x0001c1c2, 0x00000000, 0x00000200,
		0x00000000, 0x00000000, 0x0001c1c2, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr 709 */
	/* output : Limit YCbCr 2020 */
	{
		0x0001b7b8, 0xfffff88a, 0x00002a5a, 0x00000040,
		0x00000000, 0x0001bfa5, 0xffffe8fa, 0x00000200,
		0x00000000, 0x0000052d, 0x0001c2f1, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr 2020 */
	/* output : Limit YCbCr 601 */
	{
		0x0001b7b8, 0x000033d6, 0x00002e66, 0x00000040,
		0x00000000, 0x0001bf9a, 0xffffe538, 0x00000200,
		0x00000000, 0xffffda2f, 0x0001b732, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr 2020 */
	/* output : Limit YCbCr 709 */
	{
		0x0001b7b8, 0x000007fb, 0xffffd62b, 0x00000040,
		0x00000000, 0x0001c39d, 0x0000170f, 0x00000200,
		0x00000000, 0xfffffad1, 0x0001c04f, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr 2020 */
	/* output : Limit YCbCr 2020 */
	{
		0x0001b7b8, 0x00000000, 0x00000000, 0x00000040,
		0x00000000, 0x0001c1c2, 0x00000000, 0x00000200,
		0x00000000, 0x00000000, 0x0001c1c2, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr FCC */
	/* output : Limit YCbCr 601 */
	{
		0x0001b7b8, 0x00000392, 0x00000053, 0x00000040,
		0x00000000, 0x0001c1ba, 0xffffffd0, 0x00000200,
		0x00000000, 0xfffffd66, 0x0001c0e1, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr FCC */
	/* output : Limit YCbCr 709 */
	{
		0x0001b7b8, 0xffffd025, 0xffffa302, 0x00000040,
		0x00000000, 0x0001c9d0, 0x00003342, 0x00000200,
		0x00000000, 0x00001f15, 0x0001cc3c, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr FCC */
	/* output : Limit YCbCr 2020 */
	{
		0x0001b7b8, 0xffffcb7a, 0xffffcd7e, 0x00000040,
		0x00000000, 0x0001c612, 0x00001b75, 0x00000200,
		0x00000000, 0x0000246f, 0x0001ce0a, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr 240M */
	/* output : Limit YCbCr 601 */
	{
		0x0001b7b8, 0x0000210a, 0x0000542f, 0x00000040,
		0x00000000, 0x0001bc64, 0xffffcf69, 0x00000200,
		0x00000000, 0xffffe7e5, 0x0001bc29, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr 240M */
	/* output : Limit YCbCr 709 */
	{
		0x0001b7b8, 0xfffff2b4, 0xfffffd71, 0x00000040,
		0x00000000, 0x0001c1ea, 0x00000169, 0x00000200,
		0x00000000, 0x000008a3, 0x0001c3c3, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr 240M */
	/* output : Limit YCbCr 2020 */
	{
		0x0001b7b8, 0xffffec0d, 0x000027f5, 0x00000040,
		0x00000000, 0x0001bf5c, 0xffffea47, 0x00000200,
		0x00000000, 0x00000dd6, 0x0001c4f8, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr Ycgco */
	/* output : Limit YCbCr 601 */
	{
		0x0001b7b8, 0x00004c83, 0x00005159, 0x00000040,
		0x00000000, 0xfffed606, 0xfffed33b, 0x00000200,
		0x00000000, 0xfffe8763, 0x00010573, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr Ycgco */
	/* output : Limit YCbCr 709 */
	{
		0x0001b7b8, 0x0000bd41, 0x00003dbd, 0x00000040,
		0x00000000, 0xfffea54d, 0xfffeeb98, 0x00000200,
		0x00000000, 0xfffe677c, 0x0000f580, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr Ycgco */
	/* output : Limit YCbCr 2020 */
	{
		0x0001b7b8, 0x00009c8a, 0x00005970, 0x00000040,
		0x00000000, 0xfffebbd8, 0xfffee052, 0x00000200,
		0x00000000, 0xfffe626b, 0x0000f2f7, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr GBR */
	/* output : Limit YCbCr 601 */
	{
		0x0001021d, 0x00003221, 0x0000837a, 0x00000040,
		0xffff6b03, 0x0000e0e1, 0xffffb41c, 0x00000200,
		0xffff43b1, 0xffffdb6e, 0x0000e0e1, 0x00000200,
		0x00000000, 0x00000000, 0x00000000, 0x00000000,
	},

	/* input : Full YCbCr GBR */
	/* output : Limit YCbCr 709 */
	{
		0x00013a7c, 0x00001fbf, 0x00005d7c, 0x00000040,
		0xffff52a7, 0x0000e0e1, 0xffffcc78, 0x00000200,
		0xffff33be, 0xffffeb61, 0x0000e0e1, 0x00000200,
		0x00000000, 0x00000000, 0x00000000, 0x00000000,
	},

	/* input : Full YCbCr GBR */
	/* output : Limit YCbCr 2020 */
	{
		0x00012a21, 0x00001a13, 0x00007384, 0x00000040,
		0xffff5dec, 0x0000e0e1, 0xffffc133, 0x00000200,
		0xffff3135, 0xffffedea, 0x0000e0e1, 0x00000200,
		0x00000000, 0x00000000, 0x00000000, 0x00000000,
	}
};

int y2yl2f[21][16] = {
	/* input : Limit YCbCr 601 */
	/* output : Full YCbCr 601 */
	{
		0x0002542a, 0x00000000, 0x00000000, 0x00000000,
		0x00000000, 0x000246db, 0x00000000, 0x00000200,
		0x00000000, 0x00000000, 0x000246db, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr 601 */
	/* output : Full YCbCr 709 */
	{
		0x0002542a, 0xffffbb1d, 0xffff8409, 0x00000000,
		0x00000000, 0x000251b9, 0x000042ce, 0x00000200,
		0x00000000, 0x00002bbe, 0x0002559f, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr 601 */
	/* output : Full YCbCr 2020 */
	{
		0x0002542a, 0xffffb540, 0xffffbc76, 0x00000000,
		0x00000000, 0x00024cb2, 0x000023e6, 0x00000200,
		0x00000000, 0x000032b1, 0x000257f7, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr 709 */
	/* output : Full YCbCr 601 */
	{
		0x0002542a, 0x00003b35, 0x00007249, 0x00000000,
		0x00000000, 0x000240f2, 0xffffbf81, 0x00000200,
		0x00000000, 0xffffd5c5, 0x00023d2e, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr 709 */
	/* output : Full YCbCr 709 */
	{
		0x0002542a, 0x00000000, 0x00000000, 0x00000000,
		0x00000000, 0x000246db, 0x00000000, 0x00000200,
		0x00000000, 0x00000000, 0x000246db, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr 709 */
	/* output : Full YCbCr 2020 */
	{
		0x0002542a, 0xfffff61c, 0x00003823, 0x00000000,
		0x00000000, 0x0002441f, 0xffffe22a, 0x00000200,
		0x00000000, 0x000006b5, 0x00024865, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr 2020 */
	/* output : Full YCbCr 601 */
	{
		0x0002542a, 0x000044b6, 0x00003d81, 0x00000000,
		0x00000000, 0x00024411, 0xffffdd4b, 0x00000200,
		0x00000000, 0xffffcefe, 0x0002392c, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr 2020 */
	/* output : Full YCbCr 709 */
	{
		0x0002542a, 0x00000a94, 0xffffc88d, 0x00000000,
		0x00000000, 0x00024943, 0x00001de2, 0x00000200,
		0x00000000, 0xfffff948, 0x000244fb, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr 2020 */
	/* output : Full YCbCr 2020 */
	{
		0x0002542a, 0x00000000, 0x00000000, 0x00000000,
		0x00000000, 0x000246db, 0x00000000, 0x00000200,
		0x00000000, 0x00000000, 0x000246db, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr FCC */
	/* output : Full YCbCr 601 */
	{
		0x0002542a, 0x000004bb, 0x0000006e, 0x00000000,
		0x00000000, 0x000246d2, 0xffffffc2, 0x00000200,
		0x00000000, 0xfffffca0, 0x000245b8, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr FCC */
	/* output : Full YCbCr 709 */
	{
		0x0002542a, 0xffffc091, 0xffff84bc, 0x00000000,
		0x00000000, 0x0002514c, 0x0000426e, 0x00000200,
		0x00000000, 0x00002848, 0x0002546f, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr FCC */
	/* output : Full YCbCr 2020 */
	{
		0x0002542a, 0xffffba61, 0xffffbd0d, 0x00000000,
		0x00000000, 0x00024c73, 0x00002396, 0x00000200,
		0x00000000, 0x00002f37, 0x000256c6, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr 240M */
	/* output : Full YCbCr 601 */
	{
		0x0002542a, 0x00002bcb, 0x00006f96, 0x00000000,
		0x00000000, 0x00023fe8, 0xffffc107, 0x00000200,
		0x00000000, 0xffffe0c3, 0x00023f9b, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr 240M */
	/* output : Full YCbCr 709 */
	{
		0x0002542a, 0xffffee5f, 0xfffffc9b, 0x00000000,
		0x00000000, 0x0002470f, 0x000001d4, 0x00000200,
		0x00000000, 0x00000b31, 0x00024975, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr 240M */
	/* output : Full YCbCr 2020 */
	{
		0x0002542a, 0xffffe58f, 0x000034f6, 0x00000000,
		0x00000000, 0x000243c0, 0xffffe3da, 0x00000200,
		0x00000000, 0x000011ef, 0x00024b05, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr Ycgco */
	/* output : Full YCbCr 601 */
	{
		0x0002542a, 0x0000656b, 0x00006bd4, 0x00000000,
		0x00000000, 0xfffe7dd7, 0xfffe7a39, 0x00000200,
		0x00000000, 0xfffe17ee, 0x000152d2, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr Ycgco */
	/* output : Full YCbCr 709 */
	{
		0x0002542a, 0x0000fadd, 0x000051d5, 0x00000000,
		0x00000000, 0xfffe3eb4, 0xfffe99cb, 0x00000200,
		0x00000000, 0xfffdee96, 0x00013e27, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr Ycgco */
	/* output : Full YCbCr 2020 */
	{
		0x0002542a, 0x0000cf7f, 0x0000768e, 0x00000000,
		0x00000000, 0xfffe5be9, 0xfffe8b30, 0x00000200,
		0x00000000, 0xfffde805, 0x00013ade, 0x00000200,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr GBR */
	/* output : Full YCbCr 601 */
	{
		0x00015df3, 0x000043f6, 0x0000b241, 0x00000000,
		0xffff3a83, 0x00012a15, 0xffff9b68, 0x00000200,
		0xffff0665, 0xffffcf86, 0x00012a15, 0x00000200,
		0xffffffc0, 0xffffffc0, 0xffffffc0, 0x00000000,
	},

	/* input : Limit YCbCr GBR */
	/* output : Full YCbCr 709 */
	{
		0x0001aa60, 0x00002b0b, 0x00007ebf, 0x00000000,
		0xffff1a39, 0x00012a15, 0xffffbbb2, 0x00000200,
		0xfffef140, 0xffffe4ab, 0x00012a15, 0x00000200,
		0xffffffc0, 0xffffffc0, 0xffffffc0, 0x00000000,
	},

	/* input : Limit YCbCr GBR */
	/* output : Full YCbCr 2020 */
	{
		0x00019433, 0x0000235a, 0x00009c9d, 0x00000000,
		0xffff2929, 0x00012a15, 0xffffacc2, 0x00000200,
		0xfffeede4, 0xffffe807, 0x00012a15, 0x00000200,
		0xffffffc0, 0xffffffc0, 0xffffffc0, 0x00000000,
	}
};

int y2yf2f[21][16] = {
	/* input : Full YCbCr 601 */
	/* output : Full YCbCr 601 */
	{
		0x00020000, 0x00000000, 0x00000000, 0x00000000,
		0x00000000, 0x00020000, 0x00000000, 0x00000000,
		0x00000000, 0x00000000, 0x00020000, 0x00000000,
		0x00000000, 0x00000000, 0x00000000, 0x00000000,
	},

	/* input : Full YCbCr 601 */
	/* output : Full YCbCr 709 */
	{
		0x00020000, 0xffffc37d, 0xffff931b, 0x00000000,
		0x00000000, 0x0002098b, 0x00003aaf, 0x00000200,
		0x00000000, 0x0000266d, 0x00020cf8, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr 601 */
	/* output : Full YCbCr 2020 */
	{
		0x00020000, 0xffffbe57, 0xffffc4ac, 0x00000000,
		0x00000000, 0x00020521, 0x00001f89, 0x00000200,
		0x00000000, 0x00002c87, 0x00020f07, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr 709 */
	/* output : Full YCbCr 601 */
	{
		0x00020000, 0x00003402, 0x00006464, 0x00000000,
		0x00000000, 0x0001face, 0xffffc759, 0x00000200,
		0x00000000, 0xffffdae7, 0x0001f780, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr 709 */
	/* output : Full YCbCr 709 */
	{
		0x00020000, 0x00000000, 0x00000000, 0x00000000,
		0x00000000, 0x00020000, 0x00000000, 0x00000000,
		0x00000000, 0x00000000, 0x00020000, 0x00000000,
		0x00000000, 0x00000000, 0x00000000, 0x00000000,
	},

	/* input : Full YCbCr 709 */
	/* output : Full YCbCr 2020 */
	{
		0x00020000, 0xfffff750, 0x00003150, 0x00000000,
		0x00000000, 0x0001fd99, 0xffffe5ca, 0x00000200,
		0x00000000, 0x000005e4, 0x0002015a, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr 2020 */
	/* output : Full YCbCr 601 */
	{
		0x00020000, 0x00003c5c, 0x00003607, 0x00000000,
		0x00000000, 0x0001fd8c, 0xffffe183, 0x00000200,
		0x00000000, 0xffffd4f3, 0x0001f3fa, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr 2020 */
	/* output : Full YCbCr 709 */
	{
		0x00020000, 0x0000094b, 0xffffcf4b, 0x00000000,
		0x00000000, 0x0002021c, 0x00001a40, 0x00000200,
		0x00000000, 0xfffffa19, 0x0001fe5a, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr 2020 */
	/* output : Full YCbCr 2020 */
	{
		0x00020000, 0x00000000, 0x00000000, 0x00000000,
		0x00000000, 0x00020000, 0x00000000, 0x00000000,
		0x00000000, 0x00000000, 0x00020000, 0x00000000,
		0x00000000, 0x00000000, 0x00000000, 0x00000000,
	},

	/* input : Full YCbCr FCC */
	/* output : Full YCbCr 601 */
	{
		0x00020000, 0x00000428, 0x00000060, 0x00000000,
		0x00000000, 0x0001fff7, 0xffffffca, 0x00000200,
		0x00000000, 0xfffffd09, 0x0001ff00, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr FCC */
	/* output : Full YCbCr 709 */
	{
		0x00020000, 0xffffc847, 0xffff93b8, 0x00000000,
		0x00000000, 0x0002092b, 0x00003a5a, 0x00000200,
		0x00000000, 0x00002362, 0x00020bed, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr FCC */
	/* output : Full YCbCr 2020 */
	{
		0x00020000, 0xffffc2d7, 0xffffc531, 0x00000000,
		0x00000000, 0x000204e9, 0x00001f42, 0x00000200,
		0x00000000, 0x00002979, 0x00020dfb, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr 240M */
	/* output : Full YCbCr 601 */
	{
		0x00020000, 0x00002678, 0x00006205, 0x00000000,
		0x00000000, 0x0001f9e5, 0xffffc8af, 0x00000200,
		0x00000000, 0xffffe490, 0x0001f9a1, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr 240M */
	/* output : Full YCbCr 709 */
	{
		0x00020000, 0xfffff084, 0xfffffd05, 0x00000000,
		0x00000000, 0x0002002d, 0x0000019b, 0x00000200,
		0x00000000, 0x000009d5, 0x00020248, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr 240M */
	/* output : Full YCbCr 2020 */
	{
		0x00020000, 0xffffe8c6, 0x00002e86, 0x00000000,
		0x00000000, 0x0001fd45, 0xffffe746, 0x00000200,
		0x00000000, 0x00000fc1, 0x000203a8, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr Ycgco */
	/* output : Full YCbCr 601 */
	{
		0x00020000, 0x00005917, 0x00005eb8, 0x00000000,
		0x00000000, 0xfffeacc9, 0xfffea99b, 0x00000200,
		0x00000000, 0xfffe5344, 0x000129a2, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr Ycgco */
	/* output : Full YCbCr 709 */
	{
		0x00020000, 0x0000dc5d, 0x000047e3, 0x00000000,
		0x00000000, 0xfffe7552, 0xfffec557, 0x00000200,
		0x00000000, 0xfffe2ef3, 0x00011779, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr Ycgco */
	/* output : Full YCbCr 2020 */
	{
		0x00020000, 0x0000b646, 0x00006824, 0x00000000,
		0x00000000, 0xfffe8efb, 0xfffeb882, 0x00000200,
		0x00000000, 0xfffe292e, 0x00011497, 0x00000200,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr GBR */
	/* output : Full YCbCr 601 */
	{
		0x00012c8b, 0x00003a5e, 0x00009917, 0x00000000,
		0xffff5665, 0x00010000, 0xffffa99b, 0x00000200,
		0xffff29a2, 0xffffd65e, 0x00010000, 0x00000200,
		0x00000000, 0x00000000, 0x00000000, 0x00000000,
	},

	/* input : Full YCbCr GBR */
	/* output : Full YCbCr 709 */
	{
		0x00016e2f, 0x000024f7, 0x00006cda, 0x00000000,
		0xffff3aa9, 0x00010000, 0xffffc557, 0x00000200,
		0xffff1779, 0xffffe887, 0x00010000, 0x00000200,
		0x00000000, 0x00000000, 0x00000000, 0x00000000,
	},

	/* input : Full YCbCr GBR */
	/* output : Full YCbCr 2020 */
	{
		0x00015b23, 0x00001e5d, 0x00008681, 0x00000000,
		0xffff477e, 0x00010000, 0xffffb882, 0x00000200,
		0xffff1497, 0xffffeb69, 0x00010000, 0x00000200,
		0x00000000, 0x00000000, 0x00000000, 0x00000000,
	},
};

int y2rl2l[7][16] = {
	/* input : Limit YCbCr 601 */
	/* output : Limit RGB 601 */
	{
		0x00020000, 0x00000000, 0x0002bdcd, 0x00000000,
		0x00020000, 0xffff53bc, 0xfffe9a86, 0x00000000,
		0x00020000, 0x00037703, 0x00000000, 0x00000000,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr 709 */
	/* output : Limit RGB 601 */
	{
		0x00020000, 0x00000000, 0x0003144d, 0x00000000,
		0x00020000, 0xffffa23b, 0xffff15ac, 0x00000000,
		0x00020000, 0x0003a0dc, 0x00000000, 0x00000000,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr 2020 */
	/* output : Limit RGB 601 */
	{
		0x00020000, 0x00000000, 0x0002e225, 0x00000000,
		0x00020000, 0xffffada1, 0xfffee1ff, 0x00000000,
		0x00020000, 0x0003adc6, 0x00000000, 0x00000000,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr FCC */
	/* output : Limit RGB 601 */
	{
		0x00020000, 0x00000000, 0x0002bccd, 0x00000000,
		0x00020000, 0xffff59e1, 0xfffe9ba9, 0x00000000,
		0x00020000, 0x00037b04, 0x00000000, 0x00000000,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr 240M */
	/* output : Limit RGB 601 */
	{
		0x00020000, 0x00000000, 0x000314e7, 0x00000000,
		0x00020000, 0xffff8e8f, 0xffff116b, 0x00000000,
		0x00020000, 0x0003920b, 0x00000000, 0x00000000,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr Ycgco */
	/* output : Limit RGB 601 */
	{
		0x00020000, 0xfffe0b6e, 0x0001f492, 0x00000000,
		0x00020000, 0x0001f492, 0x00000000, 0x00000000,
		0x00020000, 0xfffe0b6e, 0xfffe0b6e, 0x00000000,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr GBR */
	/* output : Limit RGB 601 */
	{
		0x00000000, 0x00000000, 0x00020000, 0x00000000,
		0x00020000, 0x00000000, 0x00000000, 0x00000000,
		0x00000000, 0x00020000, 0x00000000, 0x00000000,
		0xffffffc0, 0xffffffc0, 0xffffffc0, 0x00000000,
	}
};

int y2rf2l[7][16] = {

	/* input : Full YCbCr 601 */
	/* output : Limit RGB 601 */
	{
		0x0001b7b8, 0x00000000, 0x0002687c, 0x00000040,
		0x0001b7b8, 0xffff68ad, 0xfffec5fb, 0x00000040,
		0x0001b7b8, 0x00030b2e, 0x00000000, 0x00000040,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr 709 */
	/* output : Limit RGB 601 */
	{
		0x0001b7b8, 0x00000000, 0x0002b478, 0x00000040,
		0x0001b7b8, 0xffffada1, 0xffff3228, 0x00000040,
		0x0001b7b8, 0x00032ff1, 0x00000000, 0x00000040,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr 2020 */
	/* output : Limit RGB 601 */
	{
		0x0001b7b8, 0x00000000, 0x00028868, 0x00000040,
		0x0001b7b8, 0xffffb7a5, 0xffff04c4, 0x00000040,
		0x0001b7b8, 0x00033b49, 0x00000000, 0x00000040,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr FCC */
	/* output : Limit RGB 601 */
	{
		0x0001b7b8, 0x00000000, 0x0002679b, 0x00000040,
		0x0001b7b8, 0xffff6e13, 0xfffec6fb, 0x00000040,
		0x0001b7b8, 0x00030eb3, 0x00000000, 0x00000040,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr 240M */
	/* output : Limit RGB 601 */
	{
		0x0001b7b8, 0x00000000, 0x0002b4ff, 0x00000040,
		0x0001b7b8, 0xffff9c5a, 0xffff2e6c, 0x00000040,
		0x0001b7b8, 0x000322ed, 0x00000000, 0x00000040,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr Ycgco */
	/* output : Limit RGB 601 */
	{
		0x0001b7b8, 0xfffe4848, 0x0001b7b8, 0x00000040,
		0x0001b7b8, 0x0001b7b8, 0x00000000, 0x00000040,
		0x0001b7b8, 0xfffe4848, 0xfffe4848, 0x00000040,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr GBR */
	/* output : Limit RGB 601 */
	{
		0x00000000, 0x00000000, 0x0001b7b8, 0x00000040,
		0x0001b7b8, 0x00000000, 0x00000000, 0x00000040,
		0x00000000, 0x0001b7b8, 0x00000000, 0x00000040,
		0x00000000, 0x00000000, 0x00000000, 0x00000000,
	}
};

int y2rl2f[7][16] = {
	/* input : Limit YCbCr 601 */
	/* output : Full RGB 601 */
	{
		0x0002542a, 0x00000000, 0x0003312a, 0x00000000,
		0x0002542a, 0xffff376b, 0xfffe5fc3, 0x00000000,
		0x0002542a, 0x000408d3, 0x00000000, 0x00000000,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr 709 */
	/* output : Full RGB 601 */
	{
		0x0002542a, 0x00000000, 0x000395e2, 0x00000000,
		0x0002542a, 0xffff92d1, 0xfffeef27, 0x00000000,
		0x0002542a, 0x0004398d, 0x00000000, 0x00000000,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr 2020 */
	/* output : Full RGB 601 */
	{
		0x0002542a, 0x00000000, 0x00035b7b, 0x00000000,
		0x0002542a, 0xffffa017, 0xfffeb2fc, 0x00000000,
		0x0002542a, 0x00044896, 0x00000000, 0x00000000,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr FCC */
	/* output : Full RGB 601 */
	{
		0x0002542a, 0x00000000, 0x00033000, 0x00000000,
		0x0002542a, 0xffff3e92, 0xfffe6116, 0x00000000,
		0x0002542a, 0x00040d7c, 0x00000000, 0x00000000,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr 240M */
	/* output : Full RGB 601 */
	{
		0x0002542a, 0x00000000, 0x00039695, 0x00000000,
		0x0002542a, 0xffff7be9, 0xfffeea33, 0x00000000,
		0x0002542a, 0x0004284c, 0x00000000, 0x00000000,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr Ycgco */
	/* output : Full RGB 601 */
	{
		0x0002542a, 0xfffdb925, 0x000246db, 0x00000000,
		0x0002542a, 0x000246db, 0x00000000, 0x00000000,
		0x0002542a, 0xfffdb925, 0xfffdb925, 0x00000000,
		0xffffffc0, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Limit YCbCr GBR */
	/* output : Full RGB 601 */
	{
		0x00000000, 0x00000000, 0x0002542a, 0x00000000,
		0x0002542a, 0x00000000, 0x00000000, 0x00000000,
		0x00000000, 0x0002542a, 0x00000000, 0x00000000,
		0xffffffc0, 0xffffffc0, 0xffffffc0, 0x00000000,
	}
};

int y2rf2f[7][16] = {
	/* input : Full YCbCr 601 */
	/* output : Full RGB 601 */
	{
		0x00020000, 0x00000000, 0x0002cdd3, 0x00000000,
		0x00020000, 0xffff4fcd, 0xfffe925d, 0x00000000,
		0x00020000, 0x00038b44, 0x00000000, 0x00000000,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr 709 */
	/* output : Full RGB 601 */
	{
		0x00020000, 0x00000000, 0x0003264c, 0x00000000,
		0x00020000, 0xffffa017, 0xffff1052, 0x00000000,
		0x00020000, 0x0003b611, 0x00000000, 0x00000000,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr 2020 */
	/* output : Full RGB 601 */
	{
		0x00020000, 0x00000000, 0x0002f2ff, 0x00000000,
		0x00020000, 0xffffabc0, 0xfffedb78, 0x00000000,
		0x00020000, 0x0003c347, 0x00000000, 0x00000000,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr FCC */
	/* output : Full RGB 601 */
	{
		0x00020000, 0x00000000, 0x0002cccd, 0x00000000,
		0x00020000, 0xffff5616, 0xfffe9387, 0x00000000,
		0x00020000, 0x00038f5c, 0x00000000, 0x00000000,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr 240M */
	/* output : Full RGB 601 */
	{
		0x00020000, 0x00000000, 0x000326e9, 0x00000000,
		0x00020000, 0xffff8bf8, 0xffff0bf8, 0x00000000,
		0x00020000, 0x0003a6e9, 0x00000000, 0x00000000,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr Ycgco */
	/* output : Full RGB 601 */
	{
		0x00020000, 0xfffe0000, 0x00020000, 0x00000000,
		0x00020000, 0x00020000, 0x00000000, 0x00000000,
		0x00020000, 0xfffe0000, 0xfffe0000, 0x00000000,
		0x00000000, 0xfffffe00, 0xfffffe00, 0x00000000,
	},

	/* input : Full YCbCr GBR */
	/* output : Full RGB 601 */
	{
		0x00000000, 0x00000000, 0x00020000, 0x00000000,
		0x00020000, 0x00000000, 0x00000000, 0x00000000,
		0x00000000, 0x00020000, 0x00000000, 0x00000000,
		0x00000000, 0x00000000, 0x00000000, 0x00000000,
	}
};

int fcc_range_gain[6] = {
	0x01550eaa, 0x070503f3, 0x0bdd084f, 0x0a000705,
	0x0eaa0bdd, 0x03330155
};

int fcc_hue_gain[6] = {
	0x0, 0x0, 0x0, 0x0, 0x0, 0x0
};

short fcc_hue_tab[512] = {
	0x1fe, 0x1fc, 0x1f9, 0x1f4, 0x1ee, 0x1e6, 0x1de, 0x1d4,
	0x1c9, 0x1bd, 0x1b0, 0x1a2, 0x193, 0x183, 0x172, 0x161,
	0x150, 0x13e, 0x12b, 0x119, 0x106, 0x0f3, 0x0e0, 0x0ce,
	0x0bb, 0x0a9, 0x098, 0x087, 0x077, 0x067, 0x059, 0x04b,
	0x03e, 0x032, 0x028, 0x01e, 0x016, 0x00f, 0x009, 0x005,
	0x002, 0x000, 0x000, 0x001, 0x004, 0x008, 0x00d, 0x013,
	0x01b, 0x024, 0x02f, 0x03a, 0x046, 0x054, 0x062, 0x072,
	0x082, 0x092, 0x0a4, 0x0b5, 0x0c8, 0x0da, 0x0ed, 0x0ff,
	0x112, 0x125, 0x137, 0x14a, 0x15b, 0x16d, 0x17d, 0x18d,
	0x19d, 0x1ab, 0x1b9, 0x1c5, 0x1d0, 0x1db, 0x1e4, 0x1ec,
	0x1f2, 0x1f7, 0x1fb, 0x1fe, 0x1ff, 0x1ff, 0x1ff, 0x1ff,
	0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff,
	0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff,
	0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff,
	0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff,
	0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff,
	0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff,
	0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff,
	0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff,
	0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff,
	0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff, 0x1ff,
	0x1ff, 0x1ff, 0x1ff, 0x1fe, 0x1fb, 0x1f7, 0x1f2, 0x1ec,
	0x1e4, 0x1db, 0x1d0, 0x1c5, 0x1b9, 0x1ab, 0x19d, 0x18d,
	0x17d, 0x16d, 0x15b, 0x14a, 0x137, 0x125, 0x112, 0x100,
	0x0ed, 0x0da, 0x0c8, 0x0b5, 0x0a4, 0x092, 0x082, 0x072,
	0x062, 0x054, 0x046, 0x03a, 0x02f, 0x024, 0x01b, 0x013,
	0x00d, 0x008, 0x004, 0x001, 0x000, 0x000, 0x000, 0x001,
	0x002, 0x003, 0x004, 0x006, 0x008, 0x00a, 0x00c, 0x00f,
	0x012, 0x015, 0x018, 0x01b, 0x01e, 0x022, 0x025, 0x029,
	0x02d, 0x031, 0x034, 0x038, 0x03c, 0x040, 0x043, 0x047,
	0x04a, 0x04d, 0x051, 0x054, 0x056, 0x059, 0x05b, 0x05e,
	0x060, 0x061, 0x063, 0x064, 0x065, 0x066, 0x066, 0x066,
	0x066, 0x066, 0x065, 0x064, 0x063, 0x061, 0x060, 0x05e,
	0x05b, 0x059, 0x056, 0x054, 0x051, 0x04d, 0x04a, 0x047,
	0x043, 0x040, 0x03c, 0x038, 0x034, 0x031, 0x02d, 0x029,
	0x025, 0x022, 0x01e, 0x01b, 0x018, 0x015, 0x012, 0x00f,
	0x00c, 0x00a, 0x008, 0x006, 0x004, 0x003, 0x002, 0x001,
	0x000, 0x000, 0x000, 0x000, 0x002, 0x003, 0x005, 0x008,
	0x00b, 0x00f, 0x013, 0x017, 0x01c, 0x022, 0x027, 0x02d,
	0x034, 0x03b, 0x041, 0x049, 0x050, 0x057, 0x05f, 0x066,
	0x06e, 0x075, 0x07d, 0x084, 0x08b, 0x092, 0x099, 0x09f,
	0x0a5, 0x0ab, 0x0b0, 0x0b5, 0x0ba, 0x0be, 0x0c1, 0x0c5,
	0x0c7, 0x0c9, 0x0cb, 0x0cc, 0x0cc, 0x0cc, 0x0cc, 0x0cb,
	0x0ca, 0x0c8, 0x0c6, 0x0c3, 0x0c1, 0x0bd, 0x0ba, 0x0b6,
	0x0b2, 0x0ad, 0x0a9, 0x0a4, 0x09f, 0x09a, 0x094, 0x08f,
	0x089, 0x084, 0x07e, 0x078, 0x073, 0x06d, 0x068, 0x062,
	0x05d, 0x058, 0x054, 0x04f, 0x04b, 0x047, 0x043, 0x040,
	0x03d, 0x03a, 0x038, 0x036, 0x035, 0x034, 0x033, 0x033,
	0x033, 0x034, 0x035, 0x036, 0x038, 0x03a, 0x03d, 0x040,
	0x043, 0x047, 0x04b, 0x04f, 0x054, 0x058, 0x05d, 0x062,
	0x068, 0x06d, 0x073, 0x078, 0x07e, 0x084, 0x089, 0x08f,
	0x094, 0x09a, 0x09f, 0x0a4, 0x0a9, 0x0ad, 0x0b2, 0x0b6,
	0x0ba, 0x0bd, 0x0c1, 0x0c3, 0x0c6, 0x0c8, 0x0ca, 0x0cb,
	0x0cc, 0x0cc, 0x0cc, 0x0cc, 0x0cb, 0x0c9, 0x0c7, 0x0c5,
	0x0c1, 0x0be, 0x0ba, 0x0b5, 0x0b0, 0x0ab, 0x0a5, 0x09f,
	0x099, 0x092, 0x08b, 0x084, 0x07d, 0x075, 0x06e, 0x066,
	0x05f, 0x057, 0x050, 0x049, 0x041, 0x03b, 0x034, 0x02d,
	0x027, 0x022, 0x01c, 0x017, 0x013, 0x00f, 0x00b, 0x008,
	0x005, 0x003, 0x002, 0x000, 0x000, 0x000, 0x002, 0x005,
	0x009, 0x00f, 0x016, 0x01e, 0x028, 0x032, 0x03e, 0x04b,
	0x059, 0x067, 0x077, 0x087, 0x098, 0x0a9, 0x0bb, 0x0ce,
	0x0e0, 0x0f3, 0x106, 0x119, 0x12b, 0x13e, 0x150, 0x161,
	0x172, 0x183, 0x193, 0x1a2, 0x1b0, 0x1bd, 0x1c9, 0x1d4,
	0x1de, 0x1e6, 0x1ee, 0x1f4, 0x1f9, 0x1fc, 0x1fe, 0x1ff

};

unsigned short ce_bypass_lut[256] = {
	0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40,
	44, 48, 52, 56, 60, 64, 68, 72, 76, 80,
	84, 88, 92, 96, 100, 104, 108, 112, 116, 120,
	124, 128, 132, 136, 140, 144, 148, 152, 156, 160,
	164, 168, 172, 176, 180, 184, 188, 192, 196, 200,
	204, 208, 212, 216, 220, 224, 228, 232, 236, 240,
	244, 248, 252, 256, 260, 264, 268, 272, 276, 280,
	284, 288, 292, 296, 300, 304, 308, 312, 316, 320,
	324, 328, 332, 336, 340, 344, 348, 352, 356, 360,
	364, 368, 372, 376, 380, 384, 388, 392, 396, 400,
	404, 408, 412, 416, 420, 424, 428, 432, 436, 440,
	444, 448, 452, 456, 460, 464, 468, 472, 476, 480,
	484, 488, 492, 496, 500, 504, 508, 512, 516, 520,
	524, 528, 532, 536, 540, 544, 548, 552, 556, 560,
	564, 568, 572, 576, 580, 584, 588, 592, 596, 600,
	604, 608, 612, 616, 620, 624, 628, 632, 636, 640,
	644, 648, 652, 656, 660, 664, 668, 672, 676, 680,
	684, 688, 692, 696, 700, 704, 708, 712, 716, 720,
	724, 728, 732, 736, 740, 744, 748, 752, 756, 760,
	764, 768, 772, 776, 780, 784, 788, 792, 796, 800,
	804, 808, 812, 816, 820, 824, 828, 832, 836, 840,
	844, 848, 852, 856, 860, 864, 868, 872, 876, 880,
	884, 888, 892, 896, 900, 904, 908, 912, 916, 920,
	924, 928, 932, 936, 940, 944, 948, 952, 956, 960,
	964, 968, 972, 976, 980, 984, 988, 992, 996, 1000,
	1004, 1008, 1012, 1016, 1020
};
unsigned short ce_constant_lut[256] = {
	0, 3, 6, 8, 11, 14, 17, 20, 23, 26, 29,
	32, 35, 38, 42, 45, 48, 51, 54, 58, 61,
	64, 68, 71, 74, 78, 81, 85, 88, 92, 95,
	99, 102, 106, 110, 113, 117, 120, 124, 128, 132,
	135, 139, 143, 147, 151, 154, 158, 162, 166, 170,
	174, 178, 182, 186, 190, 194, 198, 202, 206, 210,
	214, 218, 222, 227, 231, 235, 239, 243, 247, 252,
	256, 260, 264, 269, 273, 277, 282, 286, 290, 295,
	299, 303, 308, 312, 316, 321, 325, 330, 334, 339,
	343, 348, 352, 356, 361, 365, 370, 374, 379, 383,
	388, 393, 397, 402, 406, 411, 415, 420, 424, 429,
	434, 438, 443, 447, 452, 457, 461, 466, 470, 475,
	480, 484, 489, 494, 498, 503, 507, 512, 517, 521,
	526, 531, 535, 540, 544, 549, 554, 558, 563, 567,
	572, 577, 581, 586, 591, 595, 600, 604, 609, 613,
	618, 623, 627, 632, 636, 641, 645, 650, 654, 659,
	663, 668, 672, 677, 681, 686, 690, 695, 699, 704,
	708, 713, 717, 721, 726, 730, 735, 739, 743, 748,
	752, 756, 760, 765, 769, 773, 777, 782, 786, 790,
	794, 798, 803, 807, 811, 815, 819, 823, 827, 831,
	835, 839, 843, 847, 851, 855, 859, 863, 867, 871,
	874, 878, 882, 886, 890, 893, 897, 901, 904, 908,
	912, 915, 919, 922, 926, 929, 933, 936, 940, 943,
	947, 950, 953, 957, 960, 963, 966, 970, 973, 976,
	979, 982, 985, 988, 991, 994, 997, 1000, 1003, 1006,
	1009, 1012, 1015, 1017, 1020
};
